package com.test.web.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class UploadController {
	
	@RequestMapping("/upload")
	public String upload(@RequestPart("file1") MultipartFile mfile){
		String str="文件名称："+mfile.getOriginalFilename();
		str+=" 文件大小:"+mfile.getSize();
		str+=" 文件类型:"+mfile.getContentType();
		return str;
	}
}
